using OneDayModel.Model;

namespace OneDayModel.PresentationLogic
{
    public class StatisticsUILogic
    {
        private readonly IStatisiticsUI statisiticsUI;
        private readonly StatisticsModel statisticsModel;

        public StatisticsUILogic(IStatisiticsUI statisiticsUI, StatisticsModel statisticsModel)
        {
            this.statisiticsUI = statisiticsUI;
            this.statisticsModel = statisticsModel;
            SetStatistics();
        }

        private void SetStatistics()
        {
            statisiticsUI.SetTotals(statisticsModel.Totals);
            statisiticsUI.SetOnline(statisticsModel.Online);
            statisiticsUI.SetNewToday(statisticsModel.NewToday);
        }
    }
}